﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FluentNHibernate.Mapping;
using TCEasyPrintRev.Controllers;


namespace TCEasyPrintRev.Models
{

    public class WarnaMap : ClassMap<Warna>
    {
        public WarnaMap()
        {
            Id(x => x.ID);
            Map(x => x.Nama);
            Map(x => x.Harga);
        }
    }



    public class PaketMap : ClassMap<Paket>
    {
        public PaketMap()
        {
            Id(x => x.ID);
            References(x => x.warna).ForeignKey();
            References(x => x.produk).ForeignKey();
            References(x => x.bahan).ForeignKey();

            Map(x => x.panjang);
            Map(x => x.lebar);
            Map(x => x.nama);
        }
    }
    
   

    public class DetailMap : ClassMap<Detail>
    {
        public DetailMap()
        {
            Id(x => x.ID);
            References(x => x.cetak).ForeignKey();
            References(x => x.transaksi).ForeignKey();
        }
    }

   

    public class FileMap : ClassMap<File>
    {
        public FileMap()
        {
            Id(x => x.ID);
            Map(x => x.Tanggal);
            Map(x => x.size);
            Map(x => x.jenis);
            Map(x => x.path);
        }
    }

   

    public class BahanMap : ClassMap<Bahan>
    {
        public BahanMap()
        {
            Id(x => x.ID);
            Map(x => x.Nama);
            Map(x => x.Harga);
        }
    }

   

    public class MemberMap : ClassMap<Member>
    {
        public MemberMap()
        {
            Id(x => x.ID);
            Map(x => x.Nama);
            Map(x => x.Alamat);
            Map(x => x.noHP);
            Map(x => x.noTelpon);
            Map(x => x.email);
            Map(x => x.password);
        }
    }

   

    public class PetugasMap : ClassMap<Petugas>
    {
        public PetugasMap()
        {
            Id(x => x.ID);
            Map(x => x.Nama);
            Map(x => x.noHP);
            Map(x => x.email);
            Map(x => x.password);
        }
    }

    

    public class ProdukMap : ClassMap<Produk>
    {
        public ProdukMap()
        {
            Id(x => x.ID);
            Map(x => x.Nama);
            Map(x => x.Harga);
            Map(x => x.fixedSize);
        }
    }

   
    public class TransaksiMap : ClassMap<Transaksi>
    {
        public TransaksiMap()
        {
            Id(x => x.ID);
            References(x => x.member).ForeignKey();
            References(x => x.petugas).ForeignKey();
            References(x => x.kirim).ForeignKey();
            Map(x => x.totalHarga);
            Map(x => x.Tanggal);
        }
    }

    

  
    public class PengirimanMap : ClassMap<Pengiriman>
    {
        public PengirimanMap()
        {
            Id(x => x.ID);
            References(x => x.lokasi).ForeignKey();
            References(x => x.petugasKirim).ForeignKey();
            Map(x => x.deadline);
            Map(x => x.waktuKirim);

        }
    }

    

   

    public class LokasiMap : ClassMap<Lokasi>
    {
        public LokasiMap()
        {
            Id(x => x.ID);

            Map(x => x.tempat);
            Map(x => x.harga);

        }
    }
    public class CetakMap : ClassMap<Cetak>
    {
        public CetakMap()
        {
            Id(x => x.ID);

            References(x => x.paket).ForeignKey();
            References(x => x.file).ForeignKey();
            Map(x => x.isvalid);
            Map(x => x.isDone);
            Map(x => x.copy);
            Map(x => x.lebarFix);
            Map(x => x.panjangFix);


        }
    }
}
